//
//  FiveLinesRegion.m
//  MusicAnalyzer
//
//  Created by jiro on 12/04/07.
//  Copyright 2012 jiro music. All rights reserved.
//

#import "FiveLinesRegion.h"


@implementation FiveLinesRegion

@synthesize clefRegion;
@synthesize chordRegion;

- (id) initWithClef: (ClefType) clefType
{
	self = [ super init ];
	if ( self == nil )
	{
		return self;
	}

	clefRegion = [ [ ClefRegion alloc ] initWithClef: clefType ];
	chordRegions = [ NSMutableArray array ];
	
	return self;
}

- (void) addChord: ( const sc::MidiNoteChord& ) chord
{
	ChordRegion* region = [ [ ChordRegion alloc ] initWithMidiNoteChord: chord ];
	[ chordRegions addObject: region ];
}

- (int) chordRegionCount
{
	return [ chordRegions count ];
}

- (ChordRegion*) chordRegionAtIndexOf: (int) index
{
	return [ chordRegions objectAtIndex: index ];
}

@end
